function download(url: string, name: string) {
  // 创建链接元素以触发下载
  const link = document.createElement("a")
  link.href = url
  link.download = name
  // 触发下载
  link.click()
  // 清理临时URL
  URL.revokeObjectURL(url)
}

export { download }
